using System.Collections.Generic;
namespace NL.Advanced
{
    public partial class LOADING
    {
        private class ProgressEventData
        {
            public readonly float Progress;
            public readonly string EventToken;

            public ProgressEventData(float progress, string eventToken)
            {
                Progress = progress;
                EventToken = eventToken;
            }
        }

        private List<ProgressEventData> _progressEvents;
        private List<ProgressEventData> _tempDelete;

        private void InitTrackUpdateProgress()
        {
            //_progressEvents = new List<ProgressEventData>(5)
            //{
            //    new ProgressEventData(0f, AdjustToken.EnterGameProgress0),
            //    new ProgressEventData(0.25f, AdjustToken.EnterGameProgress25),
            //    new ProgressEventData(0.50f, AdjustToken.EnterGameProgress50),
            //    new ProgressEventData(0.75f, AdjustToken.EnterGameProgress75),
            //    new ProgressEventData(1f, AdjustToken.EnterGameProgress100),
            //};

            //_tempDelete = new List<ProgressEventData>(5);
        }

        private void TrackUpdateProgress(float progress)
        {
            // LOG.Add($"Loading track progress {progress}");

            //foreach (var data in _progressEvents)
            //{
            //    if (progress >= data.Progress)
            //    {
            //        SDKBridge.TrackAdjustEvent(data.EventToken);
            //        _tempDelete.Add(data);
            //    }
            //}

            //foreach (var data in _tempDelete)
            //{
            //    _progressEvents.Remove(data);
            //}
            //_tempDelete.Clear();
        }
    }
}